
<!DOCTYPE html>
<html>
<head>
	<meta charset="UTF-8">
	<title>check</title>
</head>
<div style="position: absolute;bottom: 0;width: 99%;"><p align="center" style="font:italic 15px Georgia,serif;color:white;"> Protego @ mayi</p></div>

				<body background='./image/background.jpg' style='background-repeat:no-repeat ;background-size:100% 100%; background-attachment: fixed;'>
					<br><br><br>
                <?php
				    $link = mysqli_connect('localhost', 'root');
                    if (!$link) {
				            echo "<h1 style='font-family:verdana;color:red;text-align:center;font-size:70px;'>Can't connect to local MySQL Server!Try refresh.</h1>";
					}
					else {
						$user = $_GET['username'];
						$password = $_GET['password'];
						$sql="select * from Account.users where user= '". $user ."' and password='".$password ."'";
						$result = mysqli_query($link, $sql);
						if ($result==false) {
							echo "<h1 style='font-family:verdana;color:#ffffff;text-align:center;font-size:15px'>".mysqli_error($link)."</h1>";
							die();
						}
						
						else if (mysqli_num_rows($result) == 0) {
					        echo "<h1 style='font-family:verdana;color:red;text-align:center;font-size:70px;'>NO,Wrong username password！！！</h1>";
						}
						else {
                            $row=mysqli_fetch_row($result);
							
							echo "<h1 style='font-family:verdana;color:red;text-align:center;'>Login Success!</h1><br><br><br>";
							echo "</br>";
							echo "<p style='font-family:arial;color:red;font-size:30px;text-align:center;'>Hello, $row[0]!</p>";
							echo "</br>";
							echo "<p style='font-family:arial;color:#ffffff;font-size:30px;text-align:center;'>Your password is $row[1]</p>";
						}
					}
					mysqli_close($link);
                ?>
                </body>
				
</html>
